package com.avic.map.common.util.ex;

/**
 * 业务异常类
 * Created by zjm on 27/06/2017.
 */
public class BizException extends RuntimeException {

    /**
     * 异常枚举
     */
    private BizErrorCode errorCodeEnum;

    private String description;

    public BizException(BizErrorCode errorCodeEnum, String description) {
        this.errorCodeEnum = errorCodeEnum;
        this.description = description;
    }

    public BizException(BizErrorCode errorCodeEnum) {
        this.errorCodeEnum = errorCodeEnum;
        this.description = errorCodeEnum.getDescription();
    }

    public BizErrorCode getErrorCodeEnum() {
        return errorCodeEnum;
    }

    public String getDescription() {
        return description;
    }
}
